package com.servlet.kind;

import com.enitiy.Kind;
import com.service.kind.KindServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 创建作者 ：MySunshine
 * 创建时间 2022/10/28 14:27
 * 项目名称 SHUSHAN
 */
@WebServlet("/KindSelectAllToBook")
public class KindSelectAllToBook  extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        KindServiceImpl ksi = new KindServiceImpl();
        List<Kind> kinds = ksi.kindSelectAll();
        System.out.println(kinds);
        req.setAttribute("kinds",kinds);
        req.getRequestDispatcher("/page/book/bookAdd.jsp").forward(req,resp);
    }
}
